package com.coocaa.ops.admin.v1.auth.sys;

import com.coocaa.ops.admin.base.annotation.Config;
import com.coocaa.ops.admin.base.controller.MgrBaseController;
import com.coocaa.ops.admin.v1.auth.sys.constant.MenuTokenConstants;
import com.coocaa.ops.admin.v1.auth.sys.model.query.SysLogOpModel;
import com.coocaa.ops.admin.v1.auth.sys.service.impl.SysLogOpServiceImpl;
import com.coocaa.ops.common.core.base.model.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author bijiahao
 * @date : 2019/3/27.
 * @description
 */

@RestController
@Config(menuToken = MenuTokenConstants.SYS_LOG_OP)//相关配置
@RequestMapping("/v1/sysLogOp")
public class SysLopOpController extends MgrBaseController {
    @Autowired
    private SysLogOpServiceImpl sysLogOpService;

    @RequestMapping(value = "/pageList",method = {RequestMethod.GET,RequestMethod.POST})
    public Object pageList(HttpServletRequest request, SysLogOpModel model) {
        Object data = R.ok(sysLogOpService.listPage(model));
        return render2Json(data);
    }
}
